package bairui.international.console.web.controller.branch.branch.staff;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import com.lianjing.sh.project.commons.util.Util_FileDeal;
import com.lianjing.sh.spring.web.controller.base.action.Action;

import bairui.international.model.domain.jpa.TB_BranchCompanyStaff;
import bairui.international.service.Service_BranchCompanyStaff;

/**
 *
 * 显示二维码图片
 *
 * @generated
 * 
 * @see STest_C_BranchCompanyStaff_ShowQRImg_ShowImg 测试
 *
 */
@Controller
public class C_BranchCompanyStaff_ShowQRImg_ShowImg
 extends SC_BranchCompanyStaff_ShowQRImg_ShowImg 
{
	
	@Autowired private Service_BranchCompanyStaff service_BranchCompanyStaff;
	
	/**
	 * 显示图片
	 */
	@Action(ShowImg.class)
	@GetMapping(value=ShowImg.RequestMappingValue)
	public void showImg(
		HttpServletRequest request,
		HttpServletResponse response, 
		@PathVariable(name=ShowImg.PathVariableName.BranchId) long branchId, 
		@PathVariable(name=ShowImg.PathVariableName.Id) long id
	) throws Exception {
		TB_BranchCompanyStaff bean = service_BranchCompanyStaff.findById(id);
		if(null != bean){
			Util_FileDeal.getImg(response, pathConfig.getPosition_Image_QR_CompanyStaff()+bean.getDimensionalUrl());
		}
	}
	

}
